﻿import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.0
import Qt.WebSockets 1.0
import QtQuick.Layouts 1.3




Window {
    id:root
    visible: true
//    x:0;
//    y:45
    width: fullScreen ? 640 : Screen.desktopAvailableWidth
    height: fullScreen ? 480 : Screen.desktopAvailableHeight
    title: qsTr("Hello World")
    color: "red"

    property bool fullScreen: true
//    flags: fullScreen ? Qt.Window : Qt.FramelessWindowHint
    MouseArea{
            anchors.fill: parent
            onClicked: {
                fullScreen = !fullScreen
            }
        }

    Repeater{
        model: ["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", ".", "C"]
        InputLine{
            id : aa
            x: (index % 3) * width
            y: Math.floor(index / 3 + 1) * height
            width: 200; height: 40

            source: "images/user.png"
            hint: modelData
        }
    }

    InputLine{
        id : username
        width: 200; height: 40
        anchors.horizontalCenter: parent.horizontalCenter
        source: "images/user.png"
        hint: root.x
    }
    InputLine{
        id : passwd
        width: 200; height: 40
        anchors{horizontalCenter: parent.horizontalCenter;top: username.bottom;topMargin: 10}
        source: "images/passwd.png"
        echoMode: 2
        hint: root.y
    }


//Aa{
//    anchors.fill:parent
//}



}



